//
//  ViewController.swift
//  SQL_FMDB
//
//  Created by Mr.Run on 2017/9/12.
//  Copyright © 2017年 Mr.Run. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        print(SQLiteManager.shared)
        
        let arr = [["idstr": "101", "text": "微博-101"],
        ["idstr": "102", "text": "微博-102"],
        ["idstr": "103", "text": "微博-103"],
        ["idstr": "104", "text": "微博-104"],
        ["idstr": "105", "text": "微博-105"],
        ["idstr": "106", "text": "微博-106"],
        ["idstr": "107", "text": "微博-107"],
        ["idstr": "108", "text": "微博-108"],
        ["idstr": "109", "text": "微博-109"],
        ["idstr": "110", "text": "微博-110"],
        ["idstr": "111", "text": "微博-111"],
        ["idstr": "112", "text": "微博-112"],
        ["idstr": "113", "text": "微博-113"],
        ["idstr": "114", "text": "微博-114"],
        ["idstr": "115", "text": "微博-115"],
        ["idstr": "116", "text": "微博-116"],
        ["idstr": "117", "text": "微博-117"],
        ["idstr": "118", "text": "微博-118"],
        ["idstr": "119", "text": "微博-119"],
        ["idstr": "120", "text": "微博-120"],
        ["idstr": "121", "text": "微博-121"],
        ["idstr": "122", "text": "微博-122"],
        ["idstr": "122", "text": "微博-122"],
        ["idstr": "123", "text": "微博-123"],
        ["idstr": "124", "text": "微博-124"],
        ["idstr": "125", "text": "微博-125"],
        ["idstr": "126", "text": "微博-126"],
        ["idstr": "127", "text": "微博-127"],
        ["idstr": "128", "text": "微博-128"],
        ["idstr": "129", "text": "微博-129"],
        ["idstr": "130", "text": "微博-130"],
        ["idstr": "131", "text": "微博-131"],
        ["idstr": "132", "text": "微博-132"],
        ["idstr": "133", "text": "微博-133"],
        ["idstr": "134", "text": "微博-134"],
        ["idstr": "135", "text": "微博-135"],
        ["idstr": "136", "text": "微博-136"],
        ["idstr": "137", "text": "微博-137"],
        ["idstr": "138", "text": "微博-138"],
        ["idstr": "139", "text": "微博-139"],
        ["idstr": "140", "text": "微博-140"],
        ["idstr": "141", "text": "微博-141"],
        ["idstr": "142", "text": "微博-142"],
        ["idstr": "143", "text": "微博-143"],
        ["idstr": "144", "text": "微博-144"],
        ["idstr": "145", "text": "微博-145"],
        ["idstr": "146", "text": "微博-146"],
        ]
        
        SQLiteManager.shared.updateStatus(userId: "1", array: arr)
//        let rs = SQLiteManager.shared.execRecordSet(sql: "SELECT statusId, userId, status FROM T_Status")
        
//        _ = SQLiteManager.shared.loadStatus(userId: "1", since_id: 0, max_id: 0)
//        _ = SQLiteManager.shared.loadStatus(userId: "1", since_id: 120, max_id: 0)
        let rs = SQLiteManager.shared.loadStatus(userId: "1", since_id: 0, max_id: 110)
        print(rs)
    }


}

